﻿using ClassLibrary1;
using ClassLibrary2.Calculation;
using NUnit.Framework;

namespace ClassLibraryTest
{
    [TestFixture]
    public class TestCalc
    {
        private Calc c;
        private CalcVB d;

        [SetUp]
        public void Unit()
        {
            this.c = new Calc();
            this.d = new CalcVB();
        }

        [Test]
        public void TestAdd()
        {
            Assert.AreEqual(10, c.Add(3, 7));
        }

        [TestCase(10, 2, 8)]
        [TestCase(6, 2, 4)]
        public void TestAddCheck(int sum, int x, int y)
        {
            Assert.AreEqual(sum, c.Add(x, y));
            Assert.AreEqual(sum, d.Add(x, y));
        }

        [TestCase(15,7,8)]
        [TestCase(12,3,9)]
        public void TestAddVBCheck(int sum, int x, int y)
        {
            Assert.AreEqual(sum, d.Add(x, y));
        }
    }
}
